<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<title>[%$ESPCMS_SOFT_TITLE%]</title>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_font_icon.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_public.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_all.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_framework.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_select.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/pageload.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/file.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery.cookie.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_dialog.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/md5.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/json.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/bootstrap.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/lngpack_cn.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_form.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_dialog.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_function.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_tool.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_page.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_select.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_checkbox.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_select_checkbox.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_batch.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_tab.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/nprogress.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/iframeResizer.contentWindow.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_multiple.js"></script>
		<script type="text/javascript">
			$(document).ready(function () {
				banpageKey();
				$("[placeholder]").tooltip();
				$('input[type=checkbox],input[type=radio]').espcms_checkbox();
				$("#espcms_saveInfo").espcms_formvalidation({focusName: "#typename"});
				$('#espcms_saveInfo').ajaxForm({
					type: 'POST',
					url: '[%$link.save%]',
					dataType: 'json',
					beforeSubmit: function () {
						parent.espcms_are_loading();
					},
					success: function (data) {
						parent.$("#espcms_are_loading").dialog("close");

						parent.$("body").append(data.data);
						if (data.code === 'true') {
							parent.$.espcms_sticky(data.message, {'autoclose': 3000});
							parent.frames['[%$par_iframes_name%]'].loading();
							parent.$(this).espcms_window_tab('close', {'iframeName': '[%$iframes_name%]'});
						} else {
							var botton = [
								{
									text: "[%pack:botton_pack-espcms_botton_colse%]",
									class: "btn btn-lightgray",
									click: function () {
										parent.$(this).dialog("close");
										parent.$(this).espcms_window_tab('close', {'iframeName': '[%$iframes_name%]'});
									}
								}
							];
							parent.espcms_public_dialog(data.domid_name, botton, 600);
						}
						$(window).unbind('beforeunload');
					}
				});
				$('.espcms_save_cancel').espcms_window_tab('closeTab');
				$('.espcms_dialog_link').espcms_dig();
				load_tabclick('.tab_click');

				$('.select_choice_remove').unbind('click').bind('click', function () {
					var doc_id = $(this).attr('data-id');
					var li_name = '#select_itme_id_' + doc_id;
					$('#gotoline').val('');
					$('#gotoline_title').val('');
					$(li_name).remove();
					$('.select_input_itme_title').show();
				});

			});

			function select_add_itme_list(data_json, inputname, isappend) {
				if (data_json.length < 1) {
					return false;
				}
				$('.select_input_itme_title').hide();
				var select_add_itme_li = '';
				var select_add_itme_id;
				var select_add_itme_title;
				var select_add_itme_id_array = new Array();
				var select_add_itme_title_array = new Array();
				for (var i = 0; i < data_json.length; i++) {
					if (data_json[i]['id'] && data_json[i]['title']) {
						select_add_itme_id = data_json[i]['id'];
						select_add_itme_title = decodeURI(data_json[i]['title']);
						select_add_itme_li += '<li class="select_itme_id" id="select_itme_id_' + select_add_itme_id + '" data-id="' + select_add_itme_id + '" title="' + select_add_itme_title + '"><span class="select_choice_remove" role="presentation" id="select_itme_id_' + select_add_itme_id + '" data-id="' + select_add_itme_id + '" title="' + select_add_itme_title + '">×</span><span><i class="espcms_icon_fa espcms_icon_fa-angle-right" aria-hidden="true"></i>' + select_add_itme_title + '</span></li>';

						select_add_itme_id_array.push(select_add_itme_id);
						select_add_itme_title_array.push(select_add_itme_title);
					}
				}
				if (isappend) {
					$('.select_input_itme_list_ul').append(select_add_itme_li);
				} else {
					$('.select_input_itme_list_ul').empty().append(select_add_itme_li);
				}
				$('#gotoline').val(select_add_itme_id_array);
				$('#gotoline_title').val(select_add_itme_title_array);

				$('.select_choice_remove').unbind('click').bind('click', function () {
					var doc_id = $(this).attr('data-id');
					var doc_title = $(this).attr('title');
					var li_name = '#select_itme_id_' + doc_id;
					select_add_itme_id_array.remove(doc_id);
					select_add_itme_title_array.remove(doc_title);
					$('#gotoline').val(select_add_itme_id_array);
					$('#gotoline_title').val(select_add_itme_title_array);
					$(li_name).remove();
					if (select_add_itme_id_array.length === 0) {
						$('.select_input_itme_title').show();
					}
				});
			}
		</script>
	</head>

	<body class="espcms_style_all">
		<div class="main">
			<div class="espcms_center_content_list">

				<div class="panel">
					<div class="panel-body form_bottom_page">
						<form class="form-horizontal admin-form" id="espcms_saveInfo" action="[%$link.save%]">
							<input type="hidden" name="token_key" id="token_key" value="[%$token.token_key%]"/>
							<input type="hidden" name="token_name" id="token_name" value="[%$token.token_name%]"/>
							<input type="hidden" name="infotype" id="infotype" value="[%$add_type%]"/>
							<input type="hidden" name="tid" id="tid" value="[%$read.tid%]"/>
							<input type="hidden" name="savetype" value="edit"/>
							<div class="section-divider mb40"><span>[%pack:article_pack-espcms_article_type_button_add_link%]</span></div>

							<div class="form-group">
								<label class="col-sm-2 control-label">[%pack:article_pack-espcms_article_type_typename%]</label>
								<div class="col-sm-9">
									<input type="text" name="typename" class="form-control" id="typename" value="[%$read.typename%]" maxlength="50" data-validation-minlength="2" data-validation-maxlength="50" placeholder="[%pack:article_pack-espcms_article_type_typename_title%]" title="[%pack:article_pack-espcms_article_type_typename_title%]" data-validation-msg="[%pack:article_pack-espcms_article_type_typename_validation_msg%]"/>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">[%pack:article_pack-espcms_article_list_upid%]</label>
								<div class="col-sm-9">
									<select class="selectpicker form-control" name="upid" id="upid" data-size="8" title="[%pack:article_pack-espcms_article_list_upid_title%]" data-validation="^[0-9]*$" data-validation-msg="[%pack:article_pack-espcms_article_list_upid_validation_msg%]">
										<option value="0" [%if $read[i].upid==0%] selected="selected"[%/if%] class="opt_three_0" data-icon="espcms_icon_fa espcms_icon_fa-chevron-circle-right text-danfei">[%pack:article_pack-espcms_article_list_upid_0%]</option>
										[%forlist from=$article_type_array key=i%]
											[%if $article_type_array[i].tid!=$read.tid%]
											<option value="[%$article_type_array[i].tid%]" [%if $article_type_array[i].selected=='selected'%] selected="selected"[%/if%] class="[%$article_type_array[i].classname%]" data-icon="[%$article_type_array[i].icon%]">[%$article_type_array[i].typename%]</option>
											[%else%]
											<option value="[%$article_type_array[i].tid%]" class="[%$article_type_array[i].classname%]" data-icon="[%$article_type_array[i].icon%]" disabled>[%$article_type_array[i].typename%]</option>
											[%/if%]
										[%/forlist%]
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">[%pack:article_pack-espcms_article_type_isline%]</label>
								<div class="col-sm-7 pt5">
									<input type="radio" name="isline" class="tab_click" open_list=".isline_div1" close_list=".isline_div0" value="1" [%if $read.isline==1%] checked[%/if%]/><span class="pr10">[%pack:article_pack-espcms_article_type_isline_1%]</span>
									<input type="radio" name="isline" class="tab_click" open_list=".isline_div0" close_list=".isline_div1" value="0"[%if $read.isline==0%] checked[%/if%]/><span class="pr10">[%pack:article_pack-espcms_article_type_isline_0%]</span>
								</div>
							</div>
							<div class="form-group isline_div0 [%if $read.isline==1%]displaynone[%/if%]">
								<label class="col-sm-2 control-label">[%pack:article_pack-espcms_article_type_gotoline%]</label>
								<div class="col-sm-9">
									<input type="hidden" name="gotoline" id="gotoline" value="[%$read.gotoline%]" link-validation="isline" link-gettype="radio" link-getvalue="0" validation="true" data-validation-botton="gotoline_botton" data-validation="^[1-9]+[0-9]*$" data-validation-msg="[%pack:article_pack-espcms_article_type_gotoline_validation_msg%]"/>
									<input type="hidden" name="gotoline_title" id="gotoline_title" value="[%$title_list%]"/>
									<div class="select_input_itme_group" id="gotoline_botton">
										<div class="select_input_itme_list">
											<span class="select_input_itme_title displaynone">[%pack:article_pack-espcms_article_type_gotoline_title%]</span>
											<ul class="select_input_itme_list_ul">
												[%if $read.gotoline!='' && $title_list!=''%]
												<li class="select_itme_id" id="select_itme_id_[%$read.gotoline%]" data-id="[%$read.gotoline%]" title="[%$title_list%]"><span class="select_choice_remove" role="presentation" data-id="[%$read.gotoline%]" title="[%$title_list%]">×</span><span><i class="espcms_icon_fa espcms_icon_fa-angle-right" aria-hidden="true"></i>[%$title_list%]</span></li>
												[%/if%]
											</ul>
										</div>
										<div class="select_input_itme_botton"><a title="[%pack:article_pack-espcms_article_main_button_select%]" class="icon_botton espcms_dialog_link" data-w="800px" data-h="520px" data-url="[%$article_select_link%]&inputname=gotoline&inputname2=gotoline_title&iframeName=[%$iframes_name%]&select_num=1" data-title="[%pack:article_pack-espcms_article_main_button_select%]"><i class="espcms_icon_fa espcms_icon_fa espcms_icon_fa-clipboard"></i></a></div>
									</div>
								</div>
							</div>

							<div class="form-group isline_div1 [%if $read.isline==0%]displaynone[%/if%]">
								<label class="col-sm-2 control-label">[%pack:article_pack-espcms_article_type_typeurl%]</label>
								<div class="col-sm-9">
									<input type="text" name="typeurl" class="form-control" id="typeurl" value="[%$read.typeurl%]" link-validation="isline" link-gettype="radio" link-getvalue="1" data-validation="^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+$" placeholder="[%pack:article_pack-espcms_article_type_typeurl_title%]" title="[%pack:article_pack-espcms_article_type_typeurl_title%]" data-validation-msg="[%pack:article_pack-espcms_article_type_typeurl_validation_msg%]"/>
								</div>
							</div>

							<div class="form_button">
								<button type="submit" class="btn btn-green min-w-150" formmethod="POST">[%pack:botton_pack-espcms_botton_save_ok%]</button>
								<button type="button" class="btn btn-lightgray min-w-150 espcms_save_cancel">[%pack:botton_pack-espcms_botton_save_cancel_edit%]</button>
							</div>
						</form>
					</div>
				</div>

			</div>
		</div>
		[%link file="public/load.html"%]
		[%link file="public/load_height.html"%]
	</body>
</html>
